import Layout from '@/views/layout.vue'
import Home from '@/views/second/home'
import Find from '@/views/second/find'

import User from '@/views/second/user'
import News from '@/views/second/news.vue'

import CityList from '@/views/cityList.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import HomeInfo from '@/views/homeinfo.vue'
import MyHire from '@/views/myhire.vue'
import MyMap from '@/views/ditu.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: 'home',
    children: [
      { path: 'home', component: Home },
      {
        path: 'find',
        component: Find
      },
      { path: 'user', component: User },
      { path: 'news', component: News }
    ]
  },

  { path: '/login', component: Login },
  { path: '/register', component: Register },
  { path: '/cityList', component: CityList },
  { path: '/homeinfo', name: 'homeinfo', component: HomeInfo },
  { path: '/myhire', component: MyHire },
  { path: '/map', component: MyMap }
]

export default routes
